home *** CD-ROM | disk | FTP | other *** search
- Path: bragg.bio.purdue.edu!RWA
- From: rwa@bragg.bio.purdue.edu
- Newsgroups: comp.lang.c
- Subject: FORTRAN and floats
- Date: 25 Mar 1996 18:30:00 GMT
- Organization: Purdue University, Dept. of Biological Sciences
- Message-ID: <4j6on8$fif@mozo.cc.purdue.edu>
- Reply-To: rwa@bragg.bio.purdue.edu
- NNTP-Posting-Host: bragg.bio.purdue.edu
-
- Hi -
-
- I'm sure this is an easy one ... ;-)
-
- I write a "float" from C in Ultrix to a disk file as follows:
-
- fwrite(&myFloat,sizeof(float),1,fOut);
-
- I get over to my Alpha Open VMS box and try and read it with FORTRAN and
- get gibberish. (Also can't do when writing from FORTRAN/VMS and reading in Ultrix/C).
-
- So FORTRAN/VMS likes a different format for floats than C/Ultrix.
- This is a portability issue that I'm sure there's a "clean" way to
- solve it - does anyne have any ideas for me???
-
- ???
-
- Rob
- rwa@babe.bio.purdue.edu
-